<h3><?php echo $this->title?></h3>
<div style="color:red;" id="edit_message"><?php echo $this->errMessage;?></div>
<div class="upload-image">
<form action="/admin/workshop/save" method="post" enctype="multipart/form-data">
    <table class="table table-bordered table-striped">
        <tbody>
             <tr>
                 <td>Tin liên quan (*)</td>
                 <td>
                     <select name="article_id" id="article_id">
                         <option value="0">[Chọn tin hội thảo liên quan]</option>
                         <?php foreach ($this->workshops as $workshop): ?>
                             <option value="<?php echo $workshop['id']?>" <?php echo $this->workshop['article_id'] == $workshop['id']? 'selected="selected"':""?>>
                                 <?php echo $workshop['titles']['vi']['content']?>
                             </option>
                         <?php endforeach;?>
                     </select>
                 </td>
             </tr>
             <tr>
                 <td>Ngày diễn ra (YYYY-MM-DD) (*)</td>
                 <td>
                     <input type="date" name="workshop_date" id="workshop_date" value="<?php echo $this->workshop['workshop_date']? date('Y-m-d', $this->workshop['workshop_date']) : ''?>"/>
                 </td>
             </tr>
             <tr>
                 <td> Địa điểm (*)</td>
                 <?php $wlocation = $this->workshop['location']?>
                 <td>
                     <?php foreach (Utils_Global::getLocations() as $key => $location):?>
                         <input type="radio" name="location" id="<?php echo $key?>" value="<?php echo $location?>" 
                                 <?php echo $location == $wlocation ?'checked="checked"':''?>/>
                         <label for="<?php echo $key?>" style="display: inline-block;"><?php echo $location?></label><br/>
                     <?php endforeach;?>
                 </td>
             </tr>
             <tr>
                 <td>Thứ tự</td>
                 <td>
                     <input type="number" name="order" id="order" value="<?php echo $this->workshop['order']?>"/>
                 </td>
             </tr>
             <tr>
                 <td>Hiện trên web</td>
                 <td>
                     <input type="checkbox" name="active" id="active" <?php echo $this->workshop['active']?'checked="checked"':"";?>/>
                 </td>
             </tr>
             <tr>
                <td colspan="2">
                    <input type="submit" value="Lưu" onclick="return HandleFunction.checkValidEditWorkshop()"/>
                    <a href="/admin/workshop/list">Hủy</a>
                </td> 
             </tr>
        </tbody>
      </table>
      <input type="hidden" value="<?php echo $this->workshop['id']?>" name="id" id="id"/>
</form>
</div>